SayeyeZohor Posted July 17, 2019 Share Posted July 17, 2019 IF Self.WindowState = wsMaximized THEN UniSession.AddJS(Self.WebForm.JSName + '.restore();') ELSE UniSession.AddJS(Self.WebForm.JSName + '.maximize();'); hi how to check WindowState in unigui application? Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 17, 2019 Author Share Posted July 17, 2019 anybody here? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 17, 2019 Share Posted July 17, 2019 11 hours ago, SayeyeZohor said: IF Self.WindowState = wsMaximized THEN UniSession.AddJS(Self.WebForm.JSName + '.restore();') ELSE UniSession.AddJS(Self.WebForm.JSName + '.maximize();'); Where exactly do you want to use this? Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 17, 2019 Author Share Posted July 17, 2019 i use custome max/restore btn in my form Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 17, 2019 Share Posted July 17, 2019 3 hours ago, SayeyeZohor said: i use custome max/restore btn in my form I guess I don't understand the question. You can use these commands, right?: UniSession.AddJS(Self.WebForm.JSName + '.restore();') ... Quote Link to comment Share on other sites More sharing options...
SayeyeZohor Posted July 17, 2019 Author Share Posted July 17, 2019 15 minutes ago, Sherzod said: I guess I don't understand the question. You can use these commands, right?: UniSession.AddJS(Self.WebForm.JSName + '.restore();') ... This code not working.... IF Self.WindowState = wsMaximized THEN IF Self.WindowState = wsMaximized THEN Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 17, 2019 Share Posted July 17, 2019 11 minutes ago, SayeyeZohor said: This code not working.... procedure TMainForm.UniButton1Click(Sender: TObject); begin Self.WebForm.JSInterface.JSCode('var me='#1'; if (me.maximized) {me.restore()} else {me.maximize()};'); end; 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.