Freeze Columns In VSFlexgrid 7.0
I am using VsflexGrid 7.0 in my project, but i don't know how to freeze some columns that user can not change value on it. May anyone help me ? Thanks !
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Freeze Columns
Hello:
I wrote a project using VB6.0 and Access2000. I tried to load records from a Database into the Datagrid (about 30 records)for read only. My problem is I would like to freeze the first 3 columns on the grid when using horizontal scroll bar to see all columns. Does anyone know please help. I'm very appriciated. Thanks alots
P.S.
I know The grid has a property called fixedcols then set this property to 3 and that's all, but there aren't fixcols in the Datagrid properties. Is there another way? Please help...Thanks
PLEASE HELP - How I Can Freeze 3 Columns From My FLEXIGRID
Please help
anyone know how i can freeze the Flexigrid column, i wan to freeze as in when i go to the right of the of the grid going to for example column 16, i want the first three column not moving.
This is to see the lastname, firstname and the middlename, shows while i am looking for the other information in the column. Is this can be done?
Thank you
Datagrid : Row Headers Or Freeze Columns? -
Hi,
I have a datagrid that I need the first column to be visible at all times, I either want to be able to freeze the column in the way that Excel can do this, or put the first column into the Row Header but don't know if that's even possible.
Any help or advice on this is greatly appreciated.
Many thanks,
Rob
Edited by - TSSR_Rob on 2/28/2008 9:13:45 AM
DataGrid Control And Freeze Left Columns
I would like to freeze the left column of a data grid control so that it will stay on screen while scrolling to the right.
I have found a solution by setting up two datagrids showing only the second column (first one is hidden) in the first datagrid, then the second grid shows from the third column (first two hidden).
The only problem I have is the left row delimiters show between the two data grids and when I overlap them to get rid of the one, the scroll bar left marker is also overlapped.
Anyone have any ideas how to fix or freeze the left columns while scrolling to right?
TIA rasinc
Freeze The Columns Of List View Control
Hi Gurus,
I want to freeze the columns of a Listview control in Report view mode. Is there any property of List View or any other code example to show me how to prevent the columns to be resized by the user?
Help me plz, it is really necessary.
Waqas...
Can't Have The Columns Names In Vsflexgrid
Is there an option to put the data base columns names in VSFlexGrid columns?
first time i link the vsflexgrid to an ado control it worked, but now i can't do it!?
tks 4 ur attention
VSFlexGrid : How To Make Some Columns Editable
Anybody knows how to make some columns editable and the others not
I used VSFlexGrid1.Editable = flexEDKbd
but it makes all the cell editable. I only want to make one or two columns editable on my grid.
thanks for help.
MSHFlexrid Autosize Question/problem - Extra Columns After Sizing Columns To Autofit
I'm trying to use the MSHFlexGrid control, and it's almost a great thing, but not quite.
I wrote a VB app ( I'm a newbie, and my background is midrange program coding specifically RPG on an AS/400 so please keep that in mind. Event-driven programming and VB are new to me.) that will allow users to "drive" the application and select how they want to see the hierarchy. I let them choose from the pertinent fields and they are popped into a listbox control. The order in which they appear in the listbox control determines the hierarchy, and the underlying code writes the SHAPE, APPEND statements, etc...
So far, great... The problem I have is that since I have no way of knowing what hierarchy the user will select when they run the app, I have no way to know which columns will appear in the grid, or in what order, so there is no way to pre-size the column widths.
I found an autosize routine here posted by FlyGuy, so I put that code behind a button on the form called "AutoFit". When I run the code, it resizes the columns beautifully, but the column headings disappear from the sections over the "children" "grandchildren" "greatgrandchildren" , etc... columns.
Then if I do a collapse/expand, I find that the MSHFlexGrid control has a bunch of empty columns now between the original parent and child columns. The number of columns which appear are equal to the total number of child, grandchild, greatgrandchild, etc... columns fully expanded outward, so in the example shape statement below, I wind up with 16 empty columns on the control. Every subsequent autosize leaves the control with more blank columns. If I scroll far enough to the right, I find the children with their column headers.
The question I have is what is causing this ( the empty columns and the disappearing headings ) to happen, and can I do anything to stop it? I'm not sure it's usable for the end users if this continues to happen. Should I ( or can I ) dynamically set the column widths on the control at run time? Should I load the control by trying to iterate through all the recordsets and maybe do some sort of writing to the control directly? Is there a way to stop the control from showing the repeating columns in the children ( like maybe especially if I write directly to the control )? Can I ( if I write to the control ) format the columns so that numbers are right justified?
I'm using VB6 under Windows Xp Service Pack 2, and service pack 6 for Visual Studio 6 has been applied.
Here is how I was doing it: ( Warning: ugly code alert ):
Dim cnmx As ADODB.Connection
Dim rsMX As ADODB.Recordset
Set cnmx = New ADODB.Connection
Set rsMX = New ADODB.Recordset
With cnmx
.CommandTimeout = 0
.ConnectionTimeout = 0
.Provider = "MSDataShape"
.Open "dsn=<the dsn>;User ID=<the account>;Password=<the password>"
End With
rsMX.Open SQLShapeStatement, cnmx, adOpenStatic, adLockReadOnly, adCmdText
On Error Resume Next
If Err Then MsgBox Error
Set Form3.MSHFlexGrid1.DataSource = rsMX
Form3.MSHFlexGrid1.CollapseAll
rsMX.Close
cnmx.Close
Set rsMX = Nothing
Set cnmx = Nothing
Load Form3
Form3.Show
The value of the SQLShapestatement is:
SHAPE {SELECT USAGECOSTCENTER as Dept, cast(round(SUM(COST), 2) AS decimal(9, 2)) as DeptCst From V_ISSREC_WITH_COST_AND_ASSOCIATES Where issuedate between '8/1/2007' and '8/17/2007' GROUP BY USAGECOSTCENTER ORDER BY DeptCst DESC} AS Level1
APPEND ((SHAPE {SELECT USAGECOSTCENTER as Dept, coalesce(left(EQNUM,6),(right(USAGECOSTCENTER,4) + '99')) as Equip_Num, cast(round(SUM(COST), 2) AS decimal(9, 2)) as Equip_NumCst From V_ISSREC_WITH_COST_AND_ASSOCIATES Where issuedate between '8/1/2007' and '8/17/2007' GROUP BY USAGECOSTCENTER, coalesce(left(EQNUM,6),(right(USAGECOSTCENTER,4) + '99')) ORDER BY Equip_NumCst DESC} AS Level2
APPEND ((SHAPE {SELECT USAGECOSTCENTER as Dept, coalesce(left(EQNUM,6),(right(USAGECOSTCENTER,4) + '99')) as Equip_Num,ITEMNUM as Part_Num, cast(round(SUM(Quantity), 2) AS decimal(9, 2)) as Part_NumQty, cast(round(SUM(COST), 2) AS decimal(9, 2)) as Part_NumCst From V_ISSREC_WITH_COST_AND_ASSOCIATES Where issuedate between '8/1/2007' and '8/17/2007' GROUP BY USAGECOSTCENTER, coalesce(left(
EQNUM,6),(right(USAGECOSTCENTER,4) + '99')),ITEMNUM ORDER BY Part_NumCst DESC} AS Level3
Append ({Select USAGECOSTCENTER as Dept, coalesce(left(EQNUM,6),(right(USAGECOSTCENTER,4) + '99')) as Line_Num, ITEMNUM as Part_Num, description as Prt_Desc, cast(round(QUANTITY, 2) AS decimal(9, 2)) as Qty, cast(round(COST, 2) AS decimal(9, 2)) as Cst, issuedate as Iss_Dte, Name as Emp_Nme From V_ISSREC_WITH_COST_AND_ASSOCIATES Where issuedate between '8/1/2007' and '8/17/2007' ORDER BY Cst DESC, Emp_Nme, Iss_Dte} as Level4
RELATE 'Dept' to 'Dept','Equip_Num' to 'Equip_Num','Part_Num' to 'Part_Num' )) RELATE 'Dept' to 'Dept','Equip_Num' to 'Equip_Num' ))
RELATE 'Dept' to 'Dept' )
Any suggestions welcome.
Resizing Columns In One Listview To Automatically Resize Corresponding Columns In Another.
I'm currently building the front end to a VB6 application. This app is largely based on entering data into a Listview. In order facilitate data entry, I need to create an editable row beneath the listview, comprising of text boxes(unless there is a better method) and an "add" button. The problem is that when a column in the Listview is moved or resized, the array of textboxes need to reflect this change of order/size, as each textbox needs to appear beneath its corresponding column. Also, if the listview contains a large number of columns, and therefore a horizontal scrollbar, the textboxes will need to scroll also... I would be very grateful for any help..! Thanks...
Sorting Array With 5 Columns By Any Column Or Columns
Hi all!
I have an array with 5 columns:
- city
- first name
- last name
- birth date
- children quantity
How can I sort this array by any column, for example by 4?
And how can I sort it by few columns, for example:
sort by 5 then sort by 1 then sort by 3?
Delete Emtpy Columns, Deleting All Columns
I've tried almost everything I can think of at this point.
I have a large report generated, imported to Excel.
The beginning of the code (not shown), breaks all merged cells, deletes blank rows, etc.
Now, I'm starting at the far right of the report and want to move column by column to the left deleting empty rows to bring the report together.
Excel 2003 SP2, VBA 6.3
Current code (not working correctly) reads:
Rows("1:1").Select
Selection.ClearContents
Range("A1").Select
ActiveCell.FormulaR1C1 = "END"
Term = "END"
Range("BL1").Select
While Not (ActiveCell = Term)
ActiveCell.EntireColumn.Select
delcol = False
If Value = "" Then
delcol = True
End If
If delcol = True Then
ActiveCell.EntireColumn.Delete
End If
ActiveCell.Offset(0, -1).Select
Wend
Starts by clearing all contents of row 1, places "END" in A1 so the loop knows when to close. Loop begins in BL1 and moves left until it encounters "END" (in A1) and stops.
Any suggestions or assistance would help maintain my sanity at this point!!!
Thanks in advance.
Dave
Columns(n).Autofit Error Past 257 Columns
When I run my code I get an "Application defined or object defined error" "run time error '1004'"
I thought I saw another thread with the same problem but couldnt find it.
Code:
Private Sub WriteExcelFile()
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
' Create the appropriate instances of Excel and create a new sheet
Set xlApp = New Excel.Application
Set xlWorkBook = xlApp.Workbooks.Add
Set xlWorkSheet = xlWorkBook.Worksheets.Add
' Make the application visible - just toggle the setting
xlApp.Visible = True
Dim n As Integer
For n = 1 To UBound(arrRecords)
'Size columns to data
xlWorkSheet.Columns(n).AutoFit ' <----- This is giving me the error
' Enter a value into cells
xlWorkSheet.Cells(n + 1, 1).Value = Format(arrRecords(n).string1, "#0")
xlWorkSheet.Cells(n + 1, 2).Value = arrRecords(n).string2
xlWorkSheet.Cells(n + 1, 3).Value = Format(arrRecords(n).string3, "#0")
xlWorkSheet.Cells(n + 1, 4).Value = arrRecords(n).string4
xlWorkSheet.Cells(n + 1, 5).Value = arrRecords(n).string5
If arrRecords(n).string6 = 0 Then
arrRecords(n).string6 = 0
Else
xlWorkSheet.Cells(n + 1, 6).Value = Format(arrRecords(n).string6, "$###,##0.00")
End If
If arrRecords(n).string7 = 0 Then
arrRecords(n).string7 = 0
Else
xlWorkSheet.Cells(n + 1, 7).Value = Format(arrRecords(n).string7, "$-###,##0.00")
End If
xlWorkSheet.Cells(n + 1, 8).Value = arrRecords(n).string8
xlWorkSheet.Cells(n + 1, 9).Value = arrRecords(n).string9
xlWorkSheet.Cells(n + 1, 10).Value = arrRecords(n).string10
xlWorkSheet.Cells(n + 1, 11).Value = arrRecords(n).string11
xlWorkSheet.Cells(n + 1, 12).Value = arrRecords(n).string12
xlWorkSheet.Cells(n + 1, 13).Value = arrRecords(n).string13
xlWorkSheet.Cells(n + 1, 14).Value = arrRecords(n).string14
xlWorkSheet.Cells(n + 1, 15).Value = arrRecords(n).string15
xlWorkSheet.Cells(n + 1, 16).Value = arrRecords(n).string16
Next
' Save the spreadsheet
xlWorkSheet.SaveAs "C: est.xls"
' Quit Excel
xlApp.Quit
' Clean up objects
Set xlApp = Nothing
Set xlWorkBook = Nothing
Set xlWorkSheet = Nothing
End Sub
Thanks
Edited by - epatterson78 on 5/25/2003 1:03:58 PM
Freeze?
hi,
i'm making a game at the moment and am experiencing something quite strange. Basicly what happens is that when you press a button it makes a sound. Please note i'm unexperienced in visual basic so my code is somewhat primitive and probably not commonly used.
i have 4 buttons, each button has its own windows media player control, each windows media player control contains 1 mp3. The buttons and the windows media player controls are arrays.
this is the code i used to make the mp3 play once i click the button:
Code:
Private Sub imgButton_Click(index As Integer)
wmpButton(index).Controls.play
since you can press the button without the respective wmp control finishing i added this code.
Code:
If mTaken2(mKey) = 0 Then
wmpButton(mKey).Controls.play
mTaken2(mKey) = 1
End If
If mTaken2(mKey) = 1 Then
wmpButton2(mKey).Controls.play
mTaken2(mKey) = 0
End If
which will play the same sound but from a different wmp control. (sort of like a back up set)
this all seem to work fine but when i run the game everything is all messed up. The sounds are delayed and it seems to freeze the game temporarily i.e. the timers dont respond for a few seconds amoung other things. any ideas?
EDIT: ok i realized you probably have no idea what i'm on about so i've uploaded my game.
Freeze!
Guys,
I've been developing a network gaming manager and I've got this problem: When the time of the user expires I must be able to freeze whatever his doing and ask if he/she wants to extend his/her time. I've come up with a form that is maximized and force windows to put it on top, disabling also the CTRL+ALT+DELETE and the ALT+TAB keys. It was working on applications such as Ms Word, etc., but when I tried it on Counterstrike, yes it worked but then the computer crashed. Any suggestions how to do it? Or I just did the code wrong?
Thanks a lot!
Freeze
I am using a do while loop with many commands within my loop.
It runs the commands 3000 times.
the problem during the loop program hangs and freeze, but works in background.
it takes 10 minutes to complete.
during that cancel and alt+F4 don't work.
after 10 minutes program is ok and loop is completed, but user will think that program hanged and terminate it.
how I can check after each of that 3000 times check if user either pressed cancel or alt + F4 to cancel the process?
and how can I prevent the freezing?
Freeze API
I recall hearing about an API that freezes the look of your form while it updates.
Is there a way to apply this just to a picturebox?
Code would be nice.
Thanks,
Not Freeze?
How can I make my program not freeze while it is downloding an image from the web?? I added DoEvents, but that doesn't work. It only freezes while the download is being made, after the download is finished, the program goes back to normal!!
Any suggestion? Thanks...
Freeze
Does anybody else have a problem with their computer freezing, like the cursor not moving and sound stopping and nothing working? It's not even that hot....34 c on an AMD T-Bird 1.2
Freeze My APP
How can I freeze my application for X millisecond ??
not all the computer but only the application for a very short lap of time ..
Adding Columns To A Listview That Already Has Columns
Hi
I'm new to VB6 (I usually program in VB.NET but have been asked to make an enhancement to a VB6 application).
I have a listview which has columns defined within it in the designer. The code I am looking at then retrieves data from a db and puts it into the listview.
I've been asked to add another column in the middle of the listview e.g. there are 10 columns defined in the designer and this new column needs to go at position 6. However, the data that needs to go in the new column needs to come from a different query than the one that fills the other columns. I therefore thought that the best way to do it was fill up the original columns and then slot in the new column and fill it from another query. I've been searching around but can't find any example of how to do this.
Please can anyone help, or suggest a better way to do it? Thanks!
System Freeze-up With VB6 App
I’m running a VB6 application that does image-processing on an image grabbed using an external trigger, a Euresys Picolo1 board and an NEC camera. The program runs continuously, doing analysis of a new image every 15 seconds or so. The problem we’re having is that the program and computer freeze up a couple of times a day, requiring the machine to be rebooted. We have not ruled out a hardware issue; we’re using a Compaq computer with a Pentium 4 2.5-Ghz processor, running Windows XP. But I’m also trying to figure out if there is anything in the software that might be causing the crash. Any thoughts on the hardware or software aspect of this?
Brain Freeze
How do you get the x,y position of the mouse in the dblclick event? I tried adding x as single, y as single but it gave me an error.
Kuno
Excel Freeze In VBA
I'm using Excel 2002 (10.6713.6626) SP3 in a Windows XP Professional in 2 machines and I'm having the same problem in both, is almost every time.
When I select "Font" option in a USERFORM1 the workbook is freezing up and the processor (CPU Usage) start working 100% of the capacity but is doing nothing.
I have to end the application from the Task Manager in order to work again with Excel.
Any suggestion about this problem?
Thanks.
Gonza.
Multiple Freeze.
Try this one.
In excel I want to freeze left, right and a line at the top leaving just the middle section moving.
This is the same as a normal “Window/freeze “ but I want to freeze a portion at the right as well. Is this possible? If not directly can it be emulated with VBA?
Thanks in advance
Everso
Freeze Time
Is there a formula or code you can use when a user enters a time and it shows up in a cell that time freezes and does not change?
Freeze A Worksheet?
Hi there,
Is there a way to freeze a worksheet?
I have a gigantic spreadsheet with about 30 sheets. I only need to use a few of them right now, but don't want to cut out the others since they'll be needed later. But so many calculations happen every time I change an input parameter that it takes forever to do anything. I'd like to freeze the sheets I don't need so that they don't perform any calculations. Is there a way?
thanks,
Rina
Process Freeze
Is there a way to keep the form from freezing, or to keep another form from freezing while my program is going through a "For I = " process so i can put a cancel button on it?
Freeze Variable Until It Changes
How would I hold a variable until it changes. Here is what i want to do
I have a variable that checks the memory and when I check to see if the variable has changed, I can't. I've tried something like this and it does not work:
rMem = mem1.readmemory(&HAADB22, 70)
text1.text = rMem
if rMem <> text1.text then
text2.text = text1.text
text1.text = rMem
end if
can someone figure this out?
Freeze Code
Hello,
There are two forms, form1 and form2.
How can I load form two, and in doing so, freeze form 1, such that it stops running code.
Thanks
Msflexgrid (freeze )
Could anybody tell me how is possible to freeze 5 or 6 columns when scrolling msflexgrid to right. Like Excel
Is It Possible To Freeze Time?
Is their anyway to techically make it so your computers time doest' move...
so time sensitive programs wont work?
Reason is, this 1992 demo game is time protected (2 mins it quits)
and you cant buy it anymore, so having the demo not expire would be fabulos
My VB Programs Freeze....
Does any body know why I can't use the start button to run my program.
I can make the simplest program ( i made one that just shows the time ticking away) and if I use the 'Start without debugging' button it will run, BUT as soon as I try it with just pushing the 'Run' button it freezes my whole VB program and I have to CTRL+ALT+DELETE to shut it down and start over.
I hope you have an answer.
Thanks
Freeze A Process
Hi ppl.
I'm currently building a security related application that I need to be able to freeze any process (for example like Norton does when it awaits confirmation from the user after finding an application that could pose a security threat).
I hope that this can be done with some api, like CreateProcess or KillProcess etc. Searched the web without results.
Any ideas?
Windows Freeze
Is it possible to "Freeze" all windows applications (Except the VB one) untill the VB app is closed?
Freeze A Process
Is there an API or method to freeze a specified process? I'm thinking I could find the HWND of a window in it, subclass it, and not let it pass any messages, but that would only work for the window, I'd prefer it for the whole process.
Freeze Program With XP
Hello friends,
i have developed a program in VB6. It's work percefctly, but sometimes freeze and i must close with Task Manager.
The program work with different timer and freeze during different operation.
My question is : it's possible to know esactly where freeze? There is some utility or program what running in parallel to debug the flow to retray some useful information to modify the software? There is some code to add help me to debug the program ? (it's create a debug file with a general trace, but i don't understand where is the freeze after the last command execute)
Thanks for any suggestion help me.
How Do I Freeze Panes Using OLE
Anyone
How do i freeze panes using OLE
I tried the following
OLE1.object.Sheets(1).Range("A1").Activate
OLE1.object.Sheets(1).ActiveWindow.FreezePanes = True
I get Activate Method Range of class failed
Run time Error no 1004
Regards
Sam F
Freeze Pan MSFlexgrid
Hi
I have an MSFlexgrid that contains 20 columns(1 fixed column) and 144 rows(1 fixed row),what i want is when the user scroll down the MSFlexgrid to be able to see the fixed column and the fixed row(In excel we call it freeze pan).
How can i do it?
thanks in advance
Random Freeze
I have writren a simple program in VB6 to solve numerical analysis problems.
It can however handle large amounts of data if I want to.
This program is causing a random freeze but only when the size of the data gets very big.
I wonder if it is a cpu - temperature ralated problem as I observed the same thing last August, when it was also hot (and during the winter nothing happened !).
When I ran the lavasoft antivirus program a few hours ago there was another system freeze and it like it took place when the count was getting slow (beyond 100,000).
Is there anything I should test ?
Buy a stronger fan perhaps or could it be something else ?
How Can I Freeze A Process?
hello,
How can I freeze a process? just for a while, and then get it working again?
is it even possible?
thanks
Freeze Frame
Is there a way to freeze a portion of my screen from refreshing? I am trying to impliment something like excel has where you can freeze frame a portion of the screen so when you scroll those particular rows and columns are always shown. I am basically trying to do the same thing on a grid control. I really just want to lock up certain columns so that they are always showing, don't really care for rows.
Would this be easier just to have two grid controls on the screen? One showing the columns I want to always display and the other grid showing the rest of my fields?
My System Freeze
Hi I write a program and he runs very good in all windows, 98, SE, ME, 2000 but sometimes in XP it freeze all and I have to turn off my computer. Howe can I know what component causes it or what can I do to resolve this.
Thanks for advance.
'freeze' Forms
is it possible to freeze a form w/o its controls being disabled or invisible....just simply freeze it..
Why My Program Freeze?
I wrote a program and win95,98,me,2000 works fine but in winxp the program "frezze". How can I know what ocx o what tool was the cause the problem.
Thanks
(sorry for my english)
Application Freeze In XP
I have several users using windows XP whoc complains that my application just freezes when using XP. I have one user who is using is with success. I'm use VB6 to develop my application and I'm still using the DAO object to access a MS Access 97 database.
Has anyonw else had this problem
Please note my E-Mail has changed to chris@t-shirtprint.co.za
|