|
The <a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.movenext.aspx">MoveNext</a>[<a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.movenext.aspx" target="_blank" title="New Window">^</a>] returns a boolean, not the current value of the enumerator. It does move to the next string, it just doesn't return it. MoveNext before you CreateTextTableCell and use the Current property to retrieve the string.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
if i have database contain list of Autocad Architectural elements
simple(like cornice) and
complex(like window,door,column)
and i received new design for cornice and i want to check if this new cornice is available in my database
there is any way to make the compare using programming languages ??
|
|
|
|
|
The only way to check, would be to compare every property of each object.
|
|
|
|
|
Hello !
I'm using vb.net with Entity framework.
I have this situation :
I have 2 tables related to each other : Table1(Id,vl1,vl2,vl3,vl4 ) and Table2 (id,nm1,nm2,nm3,Table1ID)
I'm creating a query step by step like this :
Query=From t in context.Table1 select t
If condition1 then query=query.Where(Function(t2) t2.vl1>10)
If condition2 then Query=query.Where(Function(t2) t2.vl2<4)
.....
Now , if Condition3 is true I want to select all records from Table1 where vl3=0 and I want to filter the nested table Table2 where nm1="x".
If condition3 then query=query.where(Function(t2) t2.vl3=0) ???????????????
How can I filter the table2 in my query ?
Thank you !
|
|
|
|
|
Hello friends, how is the day going? Please I need someone to show me the way forward of this problem. I wrote a 2d shooting game with vb6.0 which is working fine but there is something missing. I want the character to jump up on botton press and bounce on heating the ground before it stands firm. The formal code i used is not ok to my satisfaction the following is the code <code>if keycode = vbkeyup then
army.top = army.top + spd</code> where spd is a value. Please any help is welcome!
|
|
|
|
|
Otekpo Emmanuel wrote: there is something missing Yes; an upgrade to VB.NET.
Give it a try, and if you get stuck post a new message here
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi all,
I have a dll that communicate with access control hardware which stores all transactions in its memory
unfortunately, all docs are in c# which I note able to manage since I know vb6 only
the main structure (Type as in vb6) has the following:
Public Structure sysReply
' Fields
<fieldoffset(0)> _
Public nsysNumber As Short
<fieldoffset(4)> _
Public nType As Integer
<marshalas(unmanagedtype.byvalarray, sizeconst:="&H400)," fieldoffset(8)=""> _
Public sBuffer As Char()
End Structur
the sbuffer array is the union of all events
what I understand that there is no union in vb6 but is UDT
so there is many UDT's thats is related to the sbuffer according to the nType in the sysReply structure
my question is how to deal with the above in vb6?
I did the following
Public type sysReply
nsysNumber As integer
nType as integer
sBuffer() As Byte
end type
public sReply as sysReply
there is other structures that is related to the nType
and use copymemory to copy the sysRply to every udt
like:
Dim bytcommstatus As sysReplyCommStatus
CopyMemory ByVal VarPtr(bytcommstatus), ByVal VarPtr(sReply), LenB(bytcommstatus)
With bytcommstatus
debug.print .status
debug.print .error_no
end with
I get get data but I face two problems
- data are not in same order as udt
- application crashes
can someone show me example?
regards
|
|
|
|
|
idegyptsys wrote: can someone show me example?
Not using VB6.
If you "know" VB6, then you can program in VB.NET - syntax is roughly the same. Put your C# code in a C# to VB.NET translator and it may look a bit more recognizable.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to convert Audio(mp3,mp4,wav,wma,dat,flv,gp) file to text file in vb.net
|
|
|
|
|
Fine, start by researching the various speech to text libraries that are available.
|
|
|
|
|
That's not a question. That's a statement of what you want to do and the only logical response to it is to say "Permission granted! Please, proceed."
|
|
|
|
|
Hello !
How can I detect if a messagebox is shown ?
I have a situation where I need this.
Thank you !
modified 22-May-14 7:46am.
|
|
|
|
|
Based on the criteria of "message box" really you can't.
A message box window is no different than any other application window, so looking for a "special" window isn't going to work.
You can search for a particular caption message (text in the window title bar) in a window and find out that way, but you have to make sure that the caption you're looking for is unique system-wide.
|
|
|
|
|
The situation is this :
I have a form , where i have implemented IMessageFilter for a panel.
But i want that these filters should not be applied when a child form is opened or a messagebox is displayed. ( because the filter contain rules for mouse events and the forms or messagebox are positioned over this panel )
Now i have resolved the problems with child forms , inserting a condition in filter like this : (Me.OwnedForms.Count = 0) so when a child form is open this condition become false and the filter is not applied. But i want a similar condition for the messagebox.
How can i detect that a message box is shown so i can include a similar condition .
In the form there are over 50 cases when a messagebox can be shown , so i need a way for general detection of MessageBox shown.
|
|
|
|
|
dilkonika wrote: How can i detect that a message box is shown so i can include a similar condition "Detect" is a strange wording; it implies something on the background continually looking for something. You can actively verify if there's an instance of the CheckBox class on the form at that moment.
Imports System.Windows.Forms
Module Module1
Sub Main()
Using f As New Form()
Dim p As New Panel
Dim c1 As New CheckBox With {.Name = "CheckBox1"}
Dim c2 As New CheckBox With {.Name = "CheckBox2"}
f.Controls.Add(p)
f.Controls.Add(c1)
p.Controls.Add(c2)
For Each cb As CheckBox In FindAllCheckBoxes(f)
Console.WriteLine("found {0}", cb.Name)
Next
Console.ReadLine()
End Using
End Sub
Function FindAllCheckBoxes(FromWhere As Control) As IEnumerable(Of CheckBox)
Dim result As New List(Of CheckBox)
For Each c As Control In FromWhere.Controls
If TypeOf c Is CheckBox Then
result.Add(c)
End If
result.AddRange(FindAllCheckBoxes(c))
Next
Return result
End Function
End Module Would also return invisible checkboxes that may be hiding on that form.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I don't understand , why are you talking for "CheckBoxes" ? I want to detect if a MessageBox is shown or not .
|
|
|
|
|
dilkonika wrote: I don't understand , why are you talking for "CheckBoxes" I read checkbox where it says messagebox
And yes, Dave is right, as usual.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Crap, wrong Reply button...
|
|
|
|
|
OK, that doesn't change my answer at all. Again, there is nothing special about a MessageBox window that makes it different from an application window. There's no way to tell the difference.
|
|
|
|
|
Hello !
My messageboxes have all the same Caption : Warning.
I'm using this function :
DllImport("user32.dll", EntryPoint:="FindWindowW")_
Private Function FindWindowW(<marshalas(unmanagedtype.lptstr)> ByVal lpClassName As String, <marshalas(unmanagedtype.lptstr)> ByVal lpWindowName As String) As IntPtr
End Function
Public Function IsMessageBox() As Boolean
Return (FindWindowW("#32770", "Warning !")<> IntPtr.Zero)
End Function
But I don't know but the function IsMessageBox always return "False".
Maybe the class #32770 is not for this kind of window ?
I try SPY++ , but when I select the messagebox window , the class is a very long string ( that exceed the window size). I can read just this : WindowsForms10.Window .8.app.0 (...) can't read the last part.
What is the class ?
Thank you!
|
|
|
|
|
Hello everyone
I have some code that transforms and XML to HTML using a style sheet. The transformation below works fine:
Set oXML = CreateObject("MSXML.DOMDocument")
Set oXSL = CreateObject("MSXML.DOMDocument")
Set fs = CreateObject("Scripting.FileSystemObject")
oXML.Load "D:\some directory\XMLfile.xml"
oXSL.Load "D:\some directory\XSLtheme.xsl"
sHTML = oXML.transformNode(oXSL)
However, the XLS file is usually referenced as a URL rather than a Windows file path (the XLS file is lolcated on a different server). Changing the relevant line to:
oXSL.Load "http://srv001234.internal.com/somedirectory/XSLtheme.xsl"
does not work, presumably since the load method does not work with URL. Do I have to access the file via browser and save locally or is there a quicker method? And if so, what would I have to do to dave the file to the local directory? Many thanks in advance
|
|
|
|
|
Member 10666698 wrote: Do I have to access the file via browser and save locally or is there a quicker method? It has to be downloaded to a local path, and accessed from there.
Member 10666698 wrote: And if so, what would I have to do to dave the file to the local directory? Add a method to download it, and call it. There's an example here[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi Eddy
thanks for the reponse, I thought as much. I used the code from your example
Many thanks
|
|
|
|
|
I'm listing the directories using FTPWebRequest and updating the data into a sql table. My code is:
If Con.State = ConnectionState.Closed Then Con.Open()
ObjEventlog.WriteEventLog("TimerListing_Task()", "Connection Is Open Now")
Dim Rs As SqlDataReader = com.ExecuteReader(CommandBehavior.CloseConnection)
While Rs.Read
ListBox1.Items.Add("Listing DeviceID-->" & Rs(0).ToString & " Start...")
ObjEventlog.WriteEventLog("TimerListing_Task()", "Table temp_Listing_result Is Refresh Now For Device ID---> " & Rs(0).ToString)
Dim arr() As String
Dim request As FtpWebRequest = WebRequest.Create("ftp://" & Rs(1) & ":" & Rs(2) & "/" & Rs(3))
request.Credentials = New NetworkCredential(Rs(4).ToString, Rs(5).ToString)
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails
Dim response As FtpWebResponse = request.GetResponse()
Dim responseStream As Stream = response.GetResponseStream()
Dim reader As StreamReader = New StreamReader(responseStream)
ObjEventlog.WriteEventLog("TimerListing_Task()", "WebRequest is Created with ----> " & "ftp://" & Rs(1) & ":" & Rs(2) & "/" & Rs(3))
Dim loadData As String = ""
Dim lineNumber As Integer = 0
While loadData IsNot Nothing
loadData = reader.ReadLine()
arr = Split(loadData, vbNewLine)
For i = 0 To UBound(arr)
If Len(arr(i)) > 0 Then
Dim ss As String = arr(i)
ObjEventlog.WriteEventLog("TimerListing_Task()", "WebRequest Listing Result---> " & ss)
Dim isFolder As String = ss.Substring(0, 4)
If isFolder <> "drwx" Then
ss = Trim(ss.Substring(28))
ObjEventlog.WriteEventLog("TimerListing_Task()", "WebRequest Listing Result After Split---> " & ss)
Dim s() As String = vb.Split(ss, " ")
Dim modifyDate As String = s(1).ToString & " " & s(2).ToString & " " & s(3).ToString
Dim Clip() As String = vb.Split(s(4).ToString, ".")
If Clip.Length = 2 Then
ExecuteQuerys("insert into temp_Listing_result (deviceID, ClipName, ClipSize, ModifyDate, Extn) values(" & Rs(0) & ",'" & Clip(0).ToString & "','" & s(0).ToString & "','" & modifyDate & "','" & Clip(1).ToString & "')")
SqlQry = "update temp_Listing_result_process deviceID=" & Rs(0) & ", ClipName='" & Clip(0).ToString & "', ClipSize='" & s(0).ToString & "', ModifyDate='" & modifyDate & "', Extn='" & Clip(1).ToString & "' where deviceID=" & Rs(0) & ""
ExecuteQuerys(SqlQry)
Else
ExecuteQuerys("insert into temp_Listing_result (deviceID, ClipName, ClipSize, ModifyDate, Extn) values(" & Rs(0) & ",'" & Clip(0).ToString & "','" & s(0).ToString & "','" & modifyDate & "','')")
SqlQry = "update temp_Listing_result_process deviceID=" & Rs(0) & ", ClipName='" & Clip(0).ToString & "', ClipSize='" & s(0).ToString & "', ModifyDate='" & modifyDate & "' where deviceID=" & Rs(0) & ""
ExecuteQuerys(SqlQry)
End If
ListBox1.Items.Add(arr(i))
Else
ObjEventlog.WriteEventLog("TimerListing_Task()", "Folder Found ,Listing Not Done For Folder")
End If
End If
Quote: Here I've done Listing and throwing the data in the table temp_Listing_result.
If I'm inserting data only in single table then It's working fine but I want to update another temp_Listing_result_process table with previous table.
I'm getting wrong data: The data is only of one device and table is consisting only one directory data repetitively.
I'm having 4 directories, But when I listing it's listing only one device and inserting the same data again and again.
Please share your experiences.
Thanks!
|
|
|
|
|
Hello everyone
I would like to convert an XML file to Excel (xls, xlsx) using the stylesheet referenced (XSL). This is done easily opening the XML file in Excel and confirming the XSL reference. I need this to be executed from a VBScript however:
1. Open XML in Excel with style applies
2. Save to a central directory as workbook (e.g. xls)
I have only a basic understanding of VBScript. Any help is greatly appreciated
p.s. VBA apparently know a method called workbook.openXML with XSL as a parameter. I assume there is no equivalency in VBScript?
|
|
|
|
|