|
Christian Graus wrote: Feng Yuan is a very cool guy, his book on C++ Graphics programming is the best one I've ever bought. The code you're linking to is in C++, you realise that, right ?
Hehe yea I know, I just linked to show that there is a workaround (for future readers). The only question now is if there's any possibility to implement that into vb or if I should modify his program instead. I haven't read the article yet so I will start off with that first
Thanks for your help Christian Graus.
|
|
|
|
|
You should be able to use p/invoke to call C APIs in VB.
Good luck.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: Feng Yuan is a very cool guy, his book on C++ Graphics programming is the best one I've ever bought.
Sorry to nag you Christian, but would you have a link to where I can purchase it, I'm in the market for a good c++ book (ship to canada = gold), and again only if you have a url handy..
|
|
|
|
|
suppose in a string var ="abc" values i want that Keyboard automatically type this string in TextBox
plz tell me how its possible
|
|
|
|
|
Don't cross post.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Your question seems a little confused.
To put the value of the variable var into a textbox programatically just set the text property e,g, myTextbox.Text = var .
If your question is about sending keypresses to another application outside of your control you can use the SendMessage[^] API to programatically do anything to any identified window. That is not simple though.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
I am creating a program in VB.net (VS2005)
I want to know that how to dispose all objects used in my program while closing the program.
Thanks.
Gagan
|
|
|
|
|
You enumerate through your objects and call Dispose on them.
Seriously, your question about shutting down is not answerable because we have no idea what your code is doing, how the app is written, what your code does in the event of a shutdown request, ...
What is the main purpose of the app and how is the engine that provides this functionality written??
|
|
|
|
|
Some objects have a .Dispose method which you can call.
Also, you can set the object to "nothing", which will indicate to the garbage collector that the object is no longer referenced.
For example:
myObj.dispose() ' only if supported
myObj = nothing ' indicate that the object is no longer referenced
|
|
|
|
|
David Mujica wrote: Also, you can set the object to "nothing", which will indicate to the garbage collector that the object is no longer referenced.
that is completely irrelevant when the app is about to shut down as the OP stated.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
When an app shuts down, the Operating System recovers memory allotted to that app. So you don't have to worry about it. Modern operating systems (including Windows) are pre-emptive, i.e., they don't need the permission or co-operation of the applications to recover memory.
|
|
|
|
|
Also, all .Net finalizers are run while the application shuts down.
|
|
|
|
|
Not necessarily. The runtime host can decide whether to run finalizers or not during application shutdown.
|
|
|
|
|
Hi all...
I have created a program that checks system's processor's ID and some registry keys before starting. After that it works in background.
The problem is here that when the program is in execution and I am trying to shutdown my system then my system is not shutting down and the problem is that Windows is unable to kill my program's execution forcefully or something like that. How to solve this problem, suggest me.
Thanks.
Gagan
|
|
|
|
|
did you do anything special to get that?
is your app windowless?
maybe SystemEvents.SessionEnding could help you out.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Well, I am getting processor's ID by importing System.management namespace and bye creating objects of ManagementObject and ManagementObjectSearcher and getting registry keys by using my.computer.registry class.
Could you explain me your solution or do you have any piece of code?
Thanks.
Gagan
|
|
|
|
|
use Google to research; you might find things like this[^].
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
hi man,
sounds like you have override the OnClosing / OnClose functions. And in there you set the EventArgs.Cancel to true?!?
if you do this you need to check the CancelEventArguments for a CloseReason.
in that case cast the CancelEventArgs to FormClosingEventArgs and check the Property CloseReason for CloseReason.WindowsShutdow,etc.. before setting args.Cancel to true.
hope i could help
bless
|
|
|
|
|
can you help me how to use DTPicker in visual basic.
my system is reservation of lcd. i dont know the codes when im going to assign a date and time. for example im going to reserve an lcd for tomorrow and time. what codes will i use?? using DTPicker.
|
|
|
|
|
You really seem to be lost. The user would choose the dates as the next day. Now, to get that date in your code, you can use the value or text property of the datetimepicker.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hello,
I want to create a folder on vista machine using vb.net or C#. and make it share. and one more task is make it full access control for network users.
can any one suggest how i do this.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
http://www.youtube.com/watch?v=-oJaaPCrk3Q
|
|
|
|
|
Look into DirectorySecurity class. That will help you. I guess it has a setaccesscontrol method which might be of your interest.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
eg in msdn
Private Sub LoadNewPict()
' You should replace the bold image
' in the sample below with an icon of your own choosing.
PictureBox1.Image = Image.FromFile _
(System.Environment.GetFolderPath _
(System.Environment.SpecialFolder.Personal) _
& "\Image.gif")
End Sub
but when i set up a smart machine project, "image.fromfile" is not supported
Is there any other method to do it?
thanks a lot~
|
|
|
|
|
Image.FromFile is the only method I know of to load a bitmap from a file. Do you have the right dlls imported ? System.Drawing, I believe.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
There are at least three ways of getting an image from a file:
- Image.FromFile()
- Image.FromStream()
- Bitmap(filename) constructor
AFAIK the third one exists on all platforms.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|