[Q] Novice: creating a "Calendar" copy of main class "Calendar" object? - Android Software Development

[Q] Novice: creating a "Calendar" copy of main class "Calendar" object?
// edited: I'm sorry. I noticed this is absolutely not related to Android, and instead to Java. I asked this on the oracle forums. Thanks and sorry for the confusion!
(removed)
Moderator, if you can please remove this.

Related

Application1 to control App2 (VisualStudio2008)

Hello!
I'm developing one application in VS2008 for my pocket pc, and I need some help to continue with it.
I need to make the buttons of the application1 run even when the application2 is running and try to control it with application1 buttons, but I don´t know if it's possible!?
For example, is it possible to move between items on "windows mob. file explorer" using the up and down keys/buttons of application1?
The application1 only fills 1/3 of the screen, and I still seen windows explorer
When I try to do it, the application1 came to the "top" and windows file explorer control seems to be disable.
Is it possible? Any tips for it?
Regards
Have a look into the SendMessage API call. It should be able to do what you want.
Northernmost said:
Have a look into the SendMessage API call. It should be able to do what you want.
Click to expand...
Click to collapse
I agree. You basically need to catch WM_KEYDOWN messages (and any other you want to pass) and send them to file explorer... I think the tricky part is knowing what application is running directly underneath yours. Post here how you did it if you manage to achieve all that
Arlanthir said:
I agree. You basically need to catch WM_KEYDOWN messages (and any other you want to pass) and send them to file explorer... I think the tricky part is knowing what application is running directly underneath yours. Post here how you did it if you manage to achieve all that
Click to expand...
Click to collapse
Hi!
Ok, I will post here the code of application. Take a look at it and say something about.
Here goes the code:
Code:
Imports System
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("coredll.dll", CallingConvention:=CallingConvention.Winapi, CharSet:=CharSet.Unicode, EntryPoint:="keybd_event", SetLastError:=True)> _
Public Shared Sub keybd_event(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
End Sub
Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click
'Bye!
Application.Exit()
End Sub
Private Sub UpButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpButton.Click
Const VK_UP As Byte = &H26
keybd_event(VK_UP, 0, 0, 0)
'Up
End Sub
Private Sub LeftButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LeftButton.Click
Const VK_LEFT As Byte = &H25
keybd_event(VK_LEFT, 0, 0, 0)
'Left
End Sub
Private Sub DownButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DownButton.Click
Const VK_DOWN As Byte = &H28
keybd_event(VK_DOWN, 0, 0, 0)
'Down
End Sub
Private Sub RightButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RightButton.Click
Const VK_RIGHT As Byte = &H27
keybd_event(VK_RIGHT, 0, 0, 0)
'Right
End Sub
End Class
Do you think it is possible to control any other application with this?
I don't want only control windows explorer, I want to control other applications, including games.
Tanks for help.
Regards
I'm not getting what you want to do with it.
You're designing something like a userbar that's always staying on top but letting you interact with the application directly underneath it;
OR
You're making a "remote control" application to send various commands to different programs, which you specify hardcoding.
Now the control is an easy one (at least in C++) but actually getting what application is underneath yours may be tricky. Can't help much more there, specially with another language. Have you searched msdn?
Hello.
So, I mean to do a virtual d-pad cause I have one of my pocket pc dont have any!
See this post
This is what I want to do.
I think this will be, like you said, a little bit "tricky".
But, if some one could help, I think it will work.
I don't have many skills programming mobile applications.. so every tips and examples are welcome.
Regards
What? That changes everything! xD
On the first post you said you wanted to make the "up and down buttons" sent to app1 change app2... Well, I thought you were talking hardware keys here
(thus the WM_KEYDOWN event)
What language are you using and in what way do you interact with the touchscreen? Did you understand when I said you had to catch the events?
Basically, you want to catch touchscreen (mouse) events, compare the mouse coordinates to those of your buttons (let's say it was a MOUSEDOWN in the LEFT button area), get the window directly below you and post a WM_KEYDOWN message with the LEFT code to it.
The only problems in doing this in C++ for me right now (I'm also a beginner ) would be creating a window that doesn't cover the screen and getting the window below. The rest is really easy
Arlanthir said:
What? That changes everything! xD
On the first post you said you wanted to make the "up and down buttons" sent to app1 change app2... Well, I thought you were talking hardware keys here
(thus the WM_KEYDOWN event)
What language are you using and in what way do you interact with the touchscreen? Did you understand when I said you had to catch the events?
Basically, you want to catch touchscreen (mouse) events, compare the mouse coordinates to those of your buttons (let's say it was a MOUSEDOWN in the LEFT button area), get the window directly below you and post a WM_KEYDOWN message with the LEFT code to it.
The only problems in doing this in C++ for me right now (I'm also a beginner ) would be creating a window that doesn't cover the screen and getting the window below. The rest is really easy
Click to expand...
Click to collapse
Hi!
I'm using Visual Studio 2008 to code it.
Creating a window that cover only 1/3 of the screen, in VisualStudio is not difficult. If you have VS2008, I can send you the project for your email and so you can take a look at it.
If I understand, you can make this work coding it in C++, so we can share both parts... the 1/3 screen window and the way to make app1 control any other app2, cause I have no idea how to make app1 control app2!!!!!
Tanks.
all bull ****
Guys This Is Crap>>>>>>believe Me
jawad786 said:
Guys This Is Crap>>>>>>believe Me
Click to expand...
Click to collapse
?? Why this "is crap" ??
It's a mobile application development try like any other one!
ImpactMan said:
Hi!
I'm using Visual Studio 2008 to code it.
Creating a window that cover only 1/3 of the screen, in VisualStudio is not difficult. If you have VS2008, I can send you the project for your email and so you can take a look at it.
If I understand, you can make this work coding it in C++, so we can share both parts... the 1/3 screen window and the way to make app1 control any other app2, cause I have no idea how to make app1 control app2!!!!!
Tanks.
Click to expand...
Click to collapse
You are aware that Visual Studio actually lets you code in different languages, I hope.
Arlanthir said:
You are aware that Visual Studio actually lets you code in different languages, I hope.
Click to expand...
Click to collapse
Yes. I know that!
So, you think in C++ is possible to make it work?
Have any idea how to? Any tips?
Tanks for help.
Regards
I've already told you what I do know, now for the rest someone has to dig up the information from msdn... I don't have the time right now, as I'm working on something else on the little spare time I have But if you do find a way to do the rest I'll gladly help you with what I can do now.
Arlanthir said:
I've already told you what I do know, now for the rest someone has to dig up the information from msdn... I don't have the time right now, as I'm working on something else on the little spare time I have But if you do find a way to do the rest I'll gladly help you with what I can do now.
Click to expand...
Click to collapse
OK. Tanks for your availability.
I will try to make some progresses... Let you know than.
Regards.
Google is your friend - http://www.google.co.uk/search?q=compact+framework+sendmessage+send+keystroke
Top of the list (http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=40803) looks promising. Note the use of PostMessage rather than SendMessage. It appears SendMessage requires the target app to have focus to work reliably... where as PostMessage doesn't. You learn something new every day
dont know if ur coding something to control only one specific program, but if its for all programs maybe a sip input panel do the same in an easier way
Northernmost said:
Google is your friend - http://www.google.co.uk/search?q=compact+framework+sendmessage+send+keystroke
Top of the list (http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=40803) looks promising. Note the use of PostMessage rather than SendMessage. It appears SendMessage requires the target app to have focus to work reliably... where as PostMessage doesn't. You learn something new every day
Click to expand...
Click to collapse
Tanks for the links.
I've already take a look at it, and now I'm going to try understand it and try to adapt something like to my application.
I will see the to ways... PostMessage and SendMessage.
Regards.
Keep the development goin! Looks like a very interesting project I'll keep track, since I have an Omnia anyway.
Unfortunately I cannot help since I'm a begginer still stuck on Turbo C++ 3.0 (LOL, seriously-awesome right?)

MapView in a Tab

Hi,
I want to design a Application witch shows a Map with places of some Mangastories for the G1. For this I want to have two tabs. On the first tab a list of Manga witch can selected and on the other tab I want to show it in a Map. Ok, i read the tutorial for the TabWidget and for the MapView, but how can i put the MapView into the Tab? My problem is that the class extends form to different class! First I think that i have to create a second class witch include the mapview. After i done this, i want to implement it in the tab class, but i have no clue if i am right! Or how to implement in the xml file?
The second idea was, that i writ a interface! But i think this is also the wrong way!
So please help me!

Eclipse question - new android project

So I've been reading a book and have a question about a setting that hasn't been covered. I search googler, but couldn't find anything that explained it.
Under Properties, you have Application name, Package name, and Create Activity.
Where can I find more info about this? (Activity class' that apply to droid and how to use them). I've been able to make the example activities but they don't use that field. So I'm a little lost as to what it is.
Thanks!
GhettoBSD said:
So I've been reading a book and have a question about a setting that hasn't been covered. I search googler, but couldn't find anything that explained it.
Under Properties, you have Application name, Package name, and Create Activity.
Where can I find more info about this? (Activity class' that apply to droid and how to use them). I've been able to make the example activities but they don't use that field. So I'm a little lost as to what it is.
Thanks!
Click to expand...
Click to collapse
Have you been to http://developer.android.com/index.html read up there iam sure it explains everything to get you started
Application Name
This is the human-readable title for your application — the name that will appear on the Android device.
Package Name
This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity will be generated.
Your package name must be unique across all packages installed on the Android system; for this reason, it's important to use a standard domain-style package for your applications. The example above uses the "com.example" namespace, which is a namespace reserved for example documentation — when you develop your own applications, you should use a namespace that's appropriate to your organization or entity.
Create Activity
This is the name for the class stub that will be generated by the plugin. This will be a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application.
I have been there, but I'd like more information.
Create Activity
This is the name for the class stub that will be generated by the plugin. This will be a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application.
Click to expand...
Click to collapse
Trying to get more info as to which classes are available and what they're for in general.
Guess I'll keep reading my book "Beginning Android" lol
Thanks

Creating background thread

Hi
I new to android development. Presently i am working on android project and i want to create a background thread which invokes the web service and get the data and insert in to array list. From foreground i need to fetch the data from array list and display in the list view.
I tried to create a background thread. but the problem is all code has execute finally my background thread start executing.
Can anybody have sample program for background thread or anybody give the sample idea for how to do the above concept?
Thanks
mindus
The strategy I like to use is to implement a message handler as part of the main activity (using the Handler() class), then send messages to the handler from the thread to update the activity based on thread events.
ASyncTask
The way i would do this is to use ASyncTask from the android sdk, google has a pretty good example in the developer documentation. The onPostExecute method runs on the UI thread when the thread has finished executing, so you could use this to tell your adapter that theres data to be put in the listview.
Sorry i can't post the link because im new here

[Q] How to replace the dictionary in Nook Simple Touch?

Do you have any ideas how to replace EN-EN dictionary with EN-PL dictionary?
Yes, there is a whole thread on the subject of this.
You might want to start at the end because the earlier stuff is outdated.
http://forum.xda-developers.com/showthread.php?t=1477918&page=25
The basic problem is finding a good public domain source,
converting it into TEI-XML format, converting that to our format,
then generating indexes on the Nook.
Yow! I see that freedict.org just changed how they do everything.
I'll have to investigate.

Categories

Resources