|
char(0) is the NULL character in any language, so your VB6 code cannot possibly be correct.
To get a lower case 'o' as you have shown is char(111) .
I don't know how that would be coded in C++. for that the C++ forum[^] would be your best bet.
|
|
|
|
|
I have no idea where you are getting this information from but you are wrong in both cases. Try again to explain exactly what you are trying to do, and maybe someone can help you. Maybe you should post any code that you have written where you think it is generating either of these values.
It's time for a new signature.
|
|
|
|
|
In VB6, strings can contain any character including character code 0; the system explicitly keeps track of the length. When the system prints out a string, the print-out routine is told how many characters to print. In C, rather than storing the length of a string, many routines simply scan through the string until they hit a character code 0 and then stop. Character code 0 in VB6 show up as a funny box character; so do many other codes. In C, character code 0 is not valid within a string, but some other characters that yield the funny box character are valid, and may appear within a string.
|
|
|
|
|
Yes you are absolutely correct.
If you can think then I Can.
|
|
|
|
|
In C\C++ char(0) isn't a function, it's an explicit cast.
I suppose you tried to print it somehow as a string. The NULL character is a string terminator so it's not printed.
Cheers
I don't like my signature at all
modified on Wednesday, May 5, 2010 5:28 AM
|
|
|
|
|
|
We'll set aside that you are showing C# code in the VB forum, shall we?
Check the properties of your tableAdapterManager, there should be a bit somewhere, that says something like update command. Apparently Visual Studio could not create the necessary sql sentence, or it got corrupted.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi all,
I'm trying to bind a child repeater within a parent repeater by counting through all the rows of the parent repeater and for every row I would like to bind the child repeater.
I need help with the way it works.. this is what I have so far:
Sub BindParent()
'Bind Parent
End Sub
Public Sub rpParent_Databound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
For Each Item As RepeaterItemCollection In rpParent.Items
'Bind Child
Next
End Sub
Currently each Child row has a Parent row. I would like there to be a Parent row with many Child rows, and then the next Parent row would appear.
Basically it is not counting correctly. I hope all this makes sense
|
|
|
|
|
Hi
I wish to have fun a little with the 3D under VB.net, and for some time I get information a little to know what to use.
Until recently, I thought that there were only Direct3D or OpenGL, but I have just discovered XNA and SlimDX, but I am lost a little.
Apparently, XNA is not supported by VB, and as I do not know too C#, it is apparently not the good solution for me.
In many forum topics, one can read that DirectX is not supported any more.
Consequently, I am lost, and I wonder what is the best solution. I do not wish to make a game, only a mesh viewer and some calculations on the position of the points of the mesh.
My true goal would be to make a 3D scanner, but already, a mesh viewer would be already well.
What would advise me to be used? Especially, that is what will be simplest?
It is really disadvised using Direct3D as many examples of it are found?
Thanks in advance for your advises ... and sorry for my bad english
edit:
I have forgotten WPF. I don't know WPF very well,I am more at ease with the winforms.
is this an good idea to make a component WPF and to import it in a winform?
that annoys to me to pass in WPF right for the 3D.
|
|
|
|
|
There isn't any good VB.NET solution for 3D. Everything that uses managed code uses C#. There are other solutions out there that use a flavor of BASIC though.
As far as C#, you know more about it than you realize. VB.NET and C# are not all that different. Most of what you're typing is using .NET classes and methods anyway and the structure of each of those statements is very similar almost like you're typing VB.NET and putting a semicolon on the end.
Seriously, if you want to pigeon-hole yourself into VB.NET, that's fine. But if you want to expand your skills beyond just VB.NET, then now is the perfect time to learn C#. You'll find a ton of XNA samples and examples, all written in C#.
norrisMiou wrote: I have forgotten WPF. I don't know WPF very well,I am more at ease with the winforms.
is this an good idea to make a component WPF and to import it in a winform?
that annoys to me to pass in WPF right for the 3D.
Pickup a book on WPF. It's the best way to go to learn it in an organized manner.
|
|
|
|
|
norrisMiou wrote: and sorry for my bad english
Don't appologise for trying.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks for your replies.
I know that I should upgrade to C#, but I hate this semicolons and brackets ... I am just a small "sunday programmer" as we say in France
Some people on others forums say that XNA works with VB.Net ... that's right ? It seemed me to have read that many functions of XNA were not supported by VB.
|
|
|
|
|
Ok. I tested XNA with C#, and I acknowledge that it is not so hard which I thought it. In 5 minutes, I succeeded with loading a 3D mesh and that seems easier to set up than with MDX.
I then sought how to load an XNA window in a traditional winform while following the examples on their site.
That doesn't seems as simple as I tought it. There is a whole package of additional classes of which I did not really understand the utility. Ok, it is not very serious, I could spend a little time understanding them.
It would seem that one is obliged to install XNA Game Studio to make function these examples and that the redistribuable DLL is not enough.
What I believed to understand, which it is XNA or WPF, both function with DirectX? Therefore, I don't understand why we could not continue to use it.
Therefore, if MDX is deprecated and that XNA needs the Game Studio to function, there does remain only WPF which would be even sufficed for him?
What does we have to use if we just want to reach information of the graphic card ?
I am thus say “Ok, continuous with MDX”. But I have upgraded to .Net 4 and this have not DirectX in .Net references
Very crazy thing ! no ? Or then there is something which I did not understand.
|
|
|
|
|
You do NOT need XNA Studio to run the finished .EXE. Read this[^].
|
|
|
|
|
Thanks for the link.
But I can read this ...
"Also, the XNA Framework Redistributable file does not contain the Content Pipeline Build Runtime. Building content at run time is supported only when XNA Game Studio has been installed on the Windows-based development computer."
For my app, I think I need loading content at runtime. Is there something that I did not understand?
|
|
|
|
|
Your LOADING content at runtime, not BUILDING it at runtime. Unless you're providing the user the ability to create their own content for your app you don't need it.
|
|
|
|
|
I need to detect when the print button is clicked in a 3rd party app. I've used Spy++ and can return the hWnd of the toolbar but I'm not able to get the hWnd of the individual buttons. In fact, Spy++ does not return any messages when the/any button is clicked.
What I want to do is intercept the Print button click and destroy the messages and launch my own Print/Report App.
I've considered and tried allowing the Apps Print Preview to launch and used WM_SYSCOMMAND with SC_CLOSE to close the window before it has a chance to open. Unfortunately it causes the App to crash.(that is the the app with the button used to launch the Print Preview)
I've considered programatically (using api's) setting the focus to the Print Preview and using SendKeys to send an "Alt F4" but I have the problem of timing as the Print Preview window varies it's opening time depending on how much data it is processing.
I would/could check for a mouse click if I new the hWnd of the individual buttons. This brings me full circle to my original problem and that is finding the hWnd of the toolbar buttons.
I'm using VB9 (vb 2008). I don't have any problems using API's and could write (with help) a c++ dll for subclassing if I had to. (I don't mind learning new things). I just need to have someone discuss this with me and help by pointing me in the correct direction.
|
|
|
|
|
You probably can fix the timing problem (before sending Alt/F4) by using a loop that gets and checks the WindowText of the current foreground window. Make sure to waste some time too, say 33 msec, on each iteration.
|
|
|
|
|
Thanks for your reply. Alt/F4 is the very last thing I want to use.
In VB6 we had DoEvents. We no longer have this with vb.net. I looked at Sleep.Thread (not sure of syntax right now) and this appears to have problems as well when it comes to allowing other threads to process while in a loop.
There must be a way to use API's to accomplish what I need to do.
|
|
|
|
|
drh6558 wrote: In VB6 we had DoEvents. We no longer have this with vb.net
Application.DoEvents() is available; it seldom is the correct way to solve any problem.
drh6558 wrote: I looked at Sleep.Thread (not sure of syntax right now) and this appears to have problems
Thread.Sleep() works just fine for me; it needs to be used correctly, i.e. in some thread, and not inside an event handler.
|
|
|
|
|
Again, thanks for your reply.
I tried the "Alt/F4" senario this morning and found another problem that I was not aware of. If there is any data missing when the "Print" button is pressed, the application will open another window letting the user know that there is data missing.
Unfortunately, this brings me back to detecting the Toobar button click and destroying the subsequent messages. Doing it this way prevents any further surprise windows from opening.
So how do I enumerate the Toolbar child windows (enumerate the buttons to find the hWnd)?
|
|
|
|
|
You'll probably need to look around a lot. I assume you already have a handle to the main window, if not one way of getting it is by enumerating all top-level windows (EnumWindows[^]); for each window you can enumerate all child windows (EnumChildWindows[^]); doing this hierarchically will in the end lead to each and every window.
Using SPY++ may help you in identifying which ChildWindow it is you want.
If your button is a real Windows button, that should do it; if it is just a rectangle drawn by an app, which also reacts on that area being clicked, then nothing you try may help you.
|
|
|
|
|
If it creates a new process then Kill that process
SOFTDEV
If you have knowledge, let others light their candles at it. [ Let's work to help developers, not make them feel stupid ]
|
|
|
|
|
Yes, this is what I want to do but I'm having trouble finding the Toolbar Button to do this.
When I use Spy++ and select the button, the whole toolbar becomes selected. So when I try and enumerate the child windows no children are returned.
In order to return any real messages, I’ve ended up selecting the Main Window, “All windows in System” and “Non-Client” message group.
Yesterday, just before I started driving, (btw, I'm a commercial truck driver in this life. In my last life I was a vb6 programmer), I was trying different things using Spy++. I clicked on a toolbar button then moved off the button before releasing the left mouse button (button down only), I think I was able to see each toolbar buttons window. However, I don't know which child is which. Each button uses a bmp and contains no identifiable text. I will try and replicate this again and see if it can be of use.
Any ideas would be help and greatly appreciated.
|
|
|
|
|
My point of view was that when that message appears does it creates any new process in CPU tasks , if so then kill that task or use send keys if that task is running
SOFTDEV
If you have knowledge, let others light their candles at it. [ Let's work to help developers, not make them feel stupid ]
|
|
|
|