|
select secondValue from myTable where firstValue=value ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello. I need your advise about how to solve that. I have a network application that uses a socket to receive some messages. The problem is that the message size isn't always the same. The two first digits indicates the size.
My initial idea is reading these two digits and create an array with the rigth size. Is that possible or is a better idea to solve that?
Regards,
Diego F.
|
|
|
|
|
Use a list, or other dynamic array class.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I currently using VB.NET 2005 with control WebBrowser, it work properly, but when the page have link and target new window, I want it open my application, so please help me.
Regard
Socheat
................
|
|
|
|
|
You can tell the control to not spawn children, not sure if this makes the link work in your current browser.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
When the link with target "_blank" it will open IE, so I don't want like that I want it open application.
................
|
|
|
|
|
Thanks for rewording the question. Let me restate the answer. You can set the browser control to not allow popup windows of any kind, but I am not sure if it will navigate inside the main window, or just ignore them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have tried but i did not see the property "allow popup", so do you have any comments?
Thanks
Socheat
................
|
|
|
|
|
The link that should open you application. Is that a link in your WebBrowser control or is this external to your app. Like in an email? And is the behavior the same anyway?
Jelle
|
|
|
|
|
I don't understand what you mean? I mention that my application is using WebBrowser it can open any web site buy when the web site contain link with target "_blank" it will open IE automaticly, so I don't want like that I want it open my application for new windows.
Thanks
Socheat
................
|
|
|
|
|
Can somebody tell me is it possible to tell VB .net to read a list of files in a folder and list the thumbnails? Thank you very much...
|
|
|
|
|
Of course it's possible. Image thumbnails are easy, for video, you could use WMP controls and pause them somewhere in playback, or generate a thumbnail.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi there, thanks again. You replied to me a lot. Can you explain a little bit on generating thumbnail? You have any article so that I can refer to it? Thanks again..
|
|
|
|
|
There's a Microsoft dll that can create thumbnails. I am just getting the code for you, it's C#.
The code I am using, I found on the web. Google for MediaDetClass and yuo should find it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have a frmlogin form, on the login button click it opens a new frmmain form. But my problem is that even after login, it keeps that frmlogin forminstance along with the frmMain form. If i use me.close() on the click of the login button, it closes the entire application and does not show the frmMain form.
My code is as follows:
Dim objcal As FrmMain
objcal = New FrmMain
objcal.ShowDialog()
Me.close()
Where am i going wrong???
Thanks,
Riz
|
|
|
|
|
go to project -> properties in the main menu. In the application tab, change the close on startup form to false.
Posted by The ANZAC
|
|
|
|
|
A good way to do this is to write your own startup code, instead of having it autogenerated. Then you can show the login form, followed by the main form, if appropriate.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Because you use ShowDialog() the entire application is closed because objcal is not shown as a form but as a dialog. Try using Show() instead of ShowDialog().
--Zaegra--
|
|
|
|
|
In Visual studio IDE, click on Project Menu,then click on Project Properties(last option).Now click on Application Tab.
There r a combo related to shutdown mode. select "When Last form Close" option from combo box.
Hope this help u
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Ok, i've been programming for years.... I like to think I know what I'm doing a majority of the time.
However, this issue has me stumped.
I have a file with the current structure:
{
Application= {
Windows=test;
Size=100k;
Location=break;
}
System={
Havok=100;
Desk=10;
{
Cars=ford;
{
trucks=chevy;
}
}
}
}
I have a set of utilities that displays different file in my system with a vb app.
Several of the files I have use the same exact format above.
So, I figured I'd read file in with a io stream and display it in a treeview.
I'd have a root node, then off of that I’d have something like the following.
|-application
|-windows
|-size
|-Location
|-System
|-Havok
|-Desk
|-cars
|-trucks
I wrote a recursive function that would search for “{“, and call it’s self each time until it found a “}”.
It worked ok, but built my tree totally in reverse.
ANY IDEAS OR SAMPLES WOULD BE GREATLY APPRECIATED!
Thanks,
Leonard
|
|
|
|
|
Seems my formatting got hosed up.
Let me try this again.
Ok, i've been programming for years.... I like to think I know what I'm doing a majority of the time.
However, this issue has me stumped.
I have a file with the current structure:
{
Application= {
Windows=test;
Size=100k;
Location=break;
}
System={
Havok=100;
Desk=10;
{
Cars=ford;
{
trucks=chevy;
}
}
}
}
I have a set of utilities that displays different file in my system with a vb app.
Several of the files I have use the same exact format above.
So, I figured I'd read file in with a io stream and display it in a treeview.
I'd have a root node, then off of that I’d have something like the following.
|-application
|-windows
|-size
|-Location
|-System
|-Havok
|-Desk
|-cars
|-trucks
I wrote a recursive function that would search for “{“, and call it’s self each time until it found a “}”.
It worked ok, but built my tree totally in reverse.
ANY IDEAS OR SAMPLES WOULD BE GREATLY APPRECIATED!
|
|
|
|
|
ljohns wrote: It worked ok, but built my tree totally in reverse.
Reverse how? Can you post the code here?
|
|
|
|
|
Here is my code snipet.
Private Sub mnuTableTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuTableTest.Click
'********************************************************************
' Start - mnuTableTest_Click
'********************************************************************
Debug.WriteLine("**********************")
Debug.WriteLine("start: mnuTableTest_Click")
Dim xlist As String
'TODO remove hard coded file names
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(sMyFileRoot + myFileName)
Try
xlist = sr.ReadToEnd()
'remove specials
xlist = xlist.Replace(Chr(10), "")
RTrim(LTrim(xlist))
iAdvancementCounter = 0
currentendingpoint = xlist.Length
currentstartingpoint = 0
ProcessBracket(xlist)
rootnode = 0
Finally
sr.Close()
End Try
Debug.WriteLine("end: mnuTableTest_Click")
Debug.WriteLine("**********************")
'********************************************************************
' end - mnuTableTest_Click
'********************************************************************
End Sub
Public Sub ProcessBracket(ByVal mystuff As String)
'********************************************************************
' Start - ProcessBracket
'********************************************************************
Debug.WriteLine("**********************")
Debug.WriteLine("start: ProcessBracket")
Dim i As Integer
Dim xi As Integer
Dim ix As String
Dim suchis As String
Dim NodeName As String
NodeName = ""
suchis = ""
ix = ""
i = 0
xi = 0
'ok.. need to find all the first brackets
'until we find it.. we build node names
'global vars to keep track of file position
Do While currentstartingpoint < currentendingpoint
ix = ""
ix = ix + mystuff(currentstartingpoint)
If iAdvancementCounter = 1 Then
'reset nodename
Debug.WriteLine("NODE: " + NodeName)
AddClassSub(NodeName, rootnode)
NodeName = ""
iAdvancementCounter = 0
End If
If (ix = "{") Then
Debug.WriteLine("Start Root Node: " + Str(rootnode))
rootnode = rootnode + 1
currentstartingpoint = currentstartingpoint + 2
ProcessBracket(mystuff)
End If
If (ix = "}") Then
Debug.WriteLine("End Root Node: " + Str(rootnode))
rootnode = rootnode - 1
iAdvancementCounter = 1
currentstartingpoint = currentstartingpoint + 2
Exit Do
End If
If currentstartingpoint >= currentendingpoint Then Exit Do
NodeName = NodeName + mystuff(currentstartingpoint)
currentstartingpoint = currentstartingpoint + 1
Loop
Debug.WriteLine("end: ProcessBracket")
Debug.WriteLine("**********************")
'********************************************************************
' end - ProcessBracket
'********************************************************************
End Sub
Public Sub AddClassSub(ByVal NodeName As String, ByVal NodeNumber As Integer)
'********************************************************************
' Start - AddClassSub
'********************************************************************
Debug.WriteLine("**********************")
Debug.WriteLine("start: AddClassSub")
Me.tvClass.Nodes.Add(NodeName, NodeName + Str(NodeNumber))
Debug.WriteLine("end: AddClassSub")
Debug.WriteLine("**********************")
'********************************************************************
' end - ProcessBracket
'********************************************************************
End Sub
|
|
|
|
|
From a very quick glance, you are adding a node to the treeview only when you encounter a '}' - this will not produce the tree view that you have described from the input data provided.
Your input data should probably be something like this?
{
Application
{
Windows
{
test;
}
Size
{
100k;
}
Location
{
break;
}
}
System
{
Havok
{
100;
}
Desk
{
10;
{
Cars
{
ford;
{
trucks
{
chevy;
}
}
}
}
}
}
}
|
|
|
|
|
I have a VB.NET 2005 application that makes calls to a VC++ (VC6) DLL and I have that part working fine. The C++ DLL makes use of callback functions to let the VB app know of unsolicited events and that works as well (the functions are at least being called). The problem is I don't know the proper parameters to use (either the C++ or VB side) to get a byte array from C++ back to VB.
I have tried the following:
<br />
C++ side: <br />
BYTE bArray[] = { 11, 12, 13, 14, 15 };<br />
int len = 5;<br />
pfnCallback(bArray, len);<br />
<br />
VB side:<br />
CallbackHandler(ByVal data() as Byte, ByVal len as Integer)<br />
This resulted in the data array length of 1 and it only had the first value of the array no matter how big my array was.
Then I tried:
<br />
C++ side:<br />
SAFEARRAY *psa; <br />
(then properly created psa, and data copied in)<br />
pfnCallback(psa);<br />
(then properly destroy psa)<br />
<br />
VB side:<br />
CallbackHandler(ByVal data() as Byte)
This resulted in the data array length of 1 and it had the first element of C's SAFEARRAY in it (cDim). I could not see my data.
Am I barking up the wrong tree? Is what I want to do possible? I tried ByRef and got exception errors as it jumped from native code to managed code.
Thanks in advance,
Paul
|
|
|
|