xirosen 0 Light Poster

Thanks Guys for all your help. After a couple of days in searching to WWW finaly i found the answer.

xirosen 0 Light Poster

Can a pageset.dll can be use to change the default printer paper size? I have tried using printer.papersize = 5 but this doesn't work on my project. I have tried pageset orientation and it works so i wonder if pageset has the capability to change also the paper size of the default printer. Help me pls....

xirosen 0 Light Poster

AndreRet: i have try your suggestion but still it doesn't work. still the size of the datareport is in letter paper size. Can you any more idea? i really need it badly.. thanks..

xirosen 0 Light Poster

HI, can anyone help me pls on how to set the paper size of my datareport on printing.
here is my code but it doesn't work. I don't know the reason why it does not work on me.

Printer.PaperSize = 5 'SET TO LEGAL PAPER SIZE
dr1.Orientation = rptOrientLandscape
dr1.Show

Help pls..

thanks...

xirosen 0 Light Poster

Thanks andreret...

xirosen 0 Light Poster

Hi there...

I have some questions on how to optimize copying data.. here is may code...


Dim aUnicode() As Byte
Dim g1 As Integer
Dim g2 As Integer
Dim fname As String

Function Binary_copy(sourcef As String, destf As String) As Long
Dim totalS, chunksize As Long
Dim wrtn As Long, pse, st, et
wrtn = 0
totalS = CreateObject("Scripting.FileSystemObject").GetFile(sourcef).Size

If Int(totalS / 200) > 3000000 Then chunksize = 3000000 Else chunksize = Int(totalS / 200)

g1 = FreeFile: Open sourcef For Binary As #g1
g2 = FreeFile: Open destf For Binary As #g2
st = Timer

Do Until EOF(g1)
If wrtn + chunksize > totalS Then chunksize = totalS - wrtn
If chunksize = 0 Then chunksize = 1
ReDim aUnicode(1 To chunksize)
Get #g1, , aUnicode
Put #g2, , aUnicode
wrtn = wrtn + chunksize
Label1.Caption = Round(wrtn / 1000000, 2) & " MB out of " & Round(totalS / 1000000, 2) & " MB copied: " & Round(wrtn / totalS, 2) * 100 & "% done..."
pse = Timer + 0.001
et = Timer
If (Int(((et - st) * totalS) / wrtn)) - (Int(et - st)) > 60 Then Label2.Caption = Round((Int(((et - st) * totalS) / wrtn) / 60) - (Int(et - st) / 60), 2) & " mins remaining." Else Label2.Caption = Round((Int(((et - st) * totalS) / wrtn)) …

xirosen 0 Light Poster

this what i have.

dim sourcef,destf
sourcef = "\\pc1\backup\DB.bak"
destf = "d:\DB.bak"
filecopy sourcef,destf

this works but i can't see the status or how many percent is done copying. and i
also want to make much faster copy than this.

xirosen 0 Light Poster

How can i copy file with 60GB of size with much faster than usual copy (OS-Windows XP) using VB6.. any help plz..


thanks...
xirosen

xirosen 0 Light Poster

Hello,,

I've got some problem while trying to run my program that was originally made in (VB6) windows xp environment into windows 7.. everytime i try to run it, it says "Run-time Error '3633' Can't load DLL "MSRDO20.DLL"".. Can you pls help me solve this problem.. any idea pls..

thanks..

xirosen 0 Light Poster

hello,,,
pls help me on how to disable/ donot show the dropdown list even if we click the dropdown button.. help me pls...

xirosen 0 Light Poster

Our server growth is too fast from 30GB from last month now it reaches into 50GB. Is their a problem in our database? Can this be possible to shrink this database into a minimal Size?

Our server is MS SQL server 2000.

xirosen 0 Light Poster

here is the example content of my file:

line1
line2
line3
line 4
line5
line6


i need only to replace "line 4" into "line4" and here the code to view this line by line:

Set myObj = CreateObject("Scripting.FileSystemObject")

Filestr = "c:\config2.ini"
Set myFile = myObj.OpenTextFile(Filestr)

Do Until myFile.AtEndOfstream
strLine = myFile.ReadLine
If InStr(strLine, "line 4") > 0 Then
strLine = Replace(strLine, "line 4", "line4")
End If
Loop


my problem is, Can this be possible to write the replacement on the readline? help pls.
sorry for my english and explanation...

xirosen 0 Light Poster

See here how to make a usercontrol... hope this could help. :)

can i have some code examples or any simple project from you guys? thanks.

xirosen 0 Light Poster

Is it possible to have a combo box with a listview view drop down list? Help pls..

I have an attachment and i want to know how it is possible.

xirosen 0 Light Poster

Hi,,, we have a database grown too fast... from 19GB last march 09 into 52GB this Nov 09... I search through internet on what happen why do database grow fast and i find nothing,, i found out on how to "sp_spaceused" query and the result says:

database_name database_size unallocated space
MPSDB 52808.63 MB 4248.71 MB

reserved data index_size unused
49589288 KB 6859920 KB 2001880 KB 40727488 KB

My question is: is there's a way on how to use the unused bytes/allocation or can we remove those whitespaces to gain more space in our HD drive?

Help pls... i'm begging you all geniuses to pls help me.. tnx

xirosen 0 Light Poster

i have check the property of the LDF & MDF file..
the size of MDF is 53939968kb
and the sife of the LDF is 136064kb only...

xirosen 0 Light Poster

i have notice also in our database when i execute "sp_spaceused" that a big allocation for unused space were retrieved.. this is the result of the query..

database_name database_size unallocated_space
devDB 52808.63 MB 4263.15 MB


reserved data index_size unused
------------------ ------------------ ------------------ ------------------
49574504 KB 6858280 KB 2001712 KB 40714512 KB


Can we reuse the unused space?

xirosen 0 Light Poster

Hi,, i am a newbie in SQL server.. we have a database in our office.. I notice that since 2004 - 2008 our database growth was about 19GB, but since jan. 2009 to present our database grows from 19GB to 52GB... is there's something wrong happening in our database's configuration?

Can anyone pls share an idea..

Thanks..

Sorry for my english..

xirosen 0 Light Poster

can anyone help me pls on how to resize treeview while the program is running.. i know how to populate treeview but when the text is to long not all text will be displayed that is why i want to know if there is way on resizing it while running..

xirosen 0 Light Poster

Thanks for the help....

xirosen 0 Light Poster

Here my code to display the menu:

Private Sub Text5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu t5menu
End If
End Sub

But my problem is the default popup menus such as undo, copy, cut etc. keeps in taking place instead of the menus i set up..
Help me pls..

xirosen 0 Light Poster

thanks a lot for the help......

xirosen 0 Light Poster

Anyone please give an idea on how to create text box & label control during run time... Anyone pls..

xirosen 0 Light Poster

yes it do not show the icon.. but i got the right answer to my own question. THANKS A LOT FOR THE REPLY...

xirosen 0 Light Poster

Help me pls....

xirosen 0 Light Poster

Good day..

Can everyone help me pls..
i have created a code to create nodes in treeview and i am done with this. my problem is how can i view children's text on the treeview as well as the image when i click the parent?
here is my code.

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
For i = 1 To Node.Children
' in this area i want to view child's text using msgbox as well
'as the image
MsgBox (Node.child.text) '
Next i
End Sub

Private Sub Form_Load()
create_node
end sub

sub create_node()
Set TreeView1.ImageList = ImageList1 'cl & op images inserted in imagelist
Dim nodx As Node

Set nodx = TreeView1.Nodes.Add(, , "root", "Root", "rt")
nodx.Expanded = True

Set nodx = TreeView1.Nodes.Add("root", tvwChild, "1st","first", "cl")
nodx.ExpandedImage = "op"
Set nodx = TreeView1.Nodes.Add("1st", tvwChild, , "node1", "cl")
nodx.SelectedImage = "op"
Set nodx = TreeView1.Nodes.Add("1st", tvwChild, , "node2", "cl")
nodx.SelectedImage = "op"
Set nodx = TreeView1.Nodes.Add("1st", tvwChild, , "node3", "cl")
nodx.SelectedImage = "op"

Set nodx = TreeView1.Nodes.Add("root", tvwChild, "2nd", "Second", "cl")
nodx.ExpandedImage = "op"
Set nodx = TreeView1.Nodes.Add("2nd", tvwChild, , "node1", "cl")
nodx.SelectedImage = "op"
Set nodx = TreeView1.Nodes.Add("2nd", tvwChild, , "node2", "cl")
nodx.SelectedImage = "op"
Set nodx = TreeView1.Nodes.Add("2nd", tvwChild, , "node3", "cl")
nodx.SelectedImage = "op"

end sub

xirosen 0 Light Poster

yes,, it really helps a lot.. thanks... i'll work on this...
thank u so much AndreRet...

xirosen 0 Light Poster

i do have a snapshot from other program that previews document for printing.. i'm so frustrated on how to do this thing.. help me pls... thanks to the attachment.. it helps a lot..

xirosen 0 Light Poster

i have a simple program that generates information using MS Access as database. my problem is how to get code in order to preview information from my db. I know how to retrieve from db but i don't know how to plot this into print preview or what components and what code should i do.

xirosen 0 Light Poster
Hi.... can everyone help me pls in how to make program using visual basic that can Preview documents before printing.. 
Help me pls.. 
thanks...