|
dilkonika wrote: At the end of this sub I put the close instruction for the login form. Can you post that code here?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
It sounds as though the WM_PAINT messages for the main form are not being processed because, well, you're loading data and setting control values, hogging the UI (startup) thread, preventing it from processing the incoming window messages.
Those messages won't get processed, and hence, the main window painted, until the Load method is done executing.
Really, I think you're nit-picking over something that's inconsequential to the functionality of the application.
|
|
|
|
|
Do you have a solution ?
Because for me is important this thing.
|
|
|
|
|
Perhaps you better explain why having the login form stick around until after the main form grid is filled this is so important.
After 35 years of writing code, this has to be the most ridiculous requirement I've ever heard.
|
|
|
|
|
dilkonika wrote: Do you have a solution ?
Keep the loginform in front of the main-form. Don't have ANY long-running code in the constructor or the Load event of the mainform. Start a new thread when the form is shown to fetch the data, invoke when ready to display. You can additionally stop the painting if you don't want to paint while you're still updating, but that would leave a white background if the region is invalidated.
..quite an effort, with little reward.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Guys,
This time am struck with the below scenario please assist.
Am copying few files to the below location using my script.
%AppData%\Mozilla\Firefox\Profiles\6zejl8ne.default\
i need to copy files inside 6zejl8ne.default folder.
But the issue is this folder name is not constant, folder name changes for every user.
for e.g:
user 1 will have: %AppData%\Mozilla\Firefox\Profiles\6zejl8ne.default\
user 2 will have: %AppData%\Mozilla\Firefox\Profiles\4qi4qup6.default\
please assist is ther anyway i have files to the above location.
My script:
appdata = objShell.ExpandEnvironmentStrings("%appdata%")
tmp = objShell.ExpandEnvironmentStrings("%Temp%")
Const OverwriteExisting = True
objFSO.CopyFile tmp & "\Files\*.xpi",appdata & "\Mozilla\Firefox\Profiles\6zejl8ne.default\extensions\" , OverwriteExisting
where, 6zejl8ne.default folder will change for every user.
is that we can assign that folder to constant so that i can run this script on every machine ?
Cheers,
|
|
|
|
|
OK, so how are you going to determine what the folder name is?
Because once you have the folder name, the rest is very simple string manipulation to build the path.
|
|
|
|
|
I have the following sttring arrays and I would like to use IEnumerator.moveNext in order to move to the next string. Here is my code below it always in position -1. I need to start at 0 until HighLeveBenefitHeader
Dim HighLeveBenefitHeader() As String = {"Health Center Information", "", "", "", "", ""}
Dim myHighLeveBenefitEnum As IEnumerator = HighLeveBenefitHeader.GetEnumerator()
'Add Header row
Dim HeaderHighLevelBenefit As Row = CreateTableHeaderRow(currentRow)
' Add Cells
For Each value As String In HighLeveBenefitHeader
CreateTextTableCell(HeaderHighLevelBenefit, myHighLeveBenefitEnum.MoveNext, value.ToString, currentRow, 182, True)
Next
sheetData.AppendChild(HeaderHighLevelBenefit)
|
|
|
|
|
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[^]
|
|
|
|